<%@page import="aex.util.Ptool"%>
<%@page import="aex.domain.CategoryEditer"%>
<%@page import="aex.domain.ArticleCategory"%>
<%@page import="aex.domain.Puser"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	
%>

<!DOCTYPE>
<html>
<head>

<base href="<%=basePath%>">
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<!--  -->
<!--[if lt IE 9]>
<script type="text/javascript" src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
<script type="text/javascript" src="http://libs.useso.com/js/respond.js/1.4.2/respond.min.js"></script>
<script type="text/javascript" src="http://cdn.bootcss.com/css3pie/2.0beta1/PIE_IE678.js"></script>
<![endif]-->
<!--[if IE 7]>
<link href="http://www.bootcss.com/p/font-awesome/assets/css/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 6]>
<script type="text/javascript" src="systemJs/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<link href="systemStyle/H-ui.css" rel="stylesheet" type="text/css" />
<link href="systemStyle/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="plugin/font/font-awesome.min.css"  rel="stylesheet" type="text/css"	 />


  	
	<link rel="stylesheet" type="text/css" href="expandStyle/aex_userPage.css">
	<link rel="stylesheet" type="text/css" href="expandStyle/groups.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/index.css" />
	
	<script type="text/javascript" src="http://libs.useso.com/js/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="expandStyle/aex_userPage.js"></script>
	

<style type="text/css">
	h1,h2,h3{
		margin-top: 0px;
	}
</style>


<title>${webTitle}网站管理后台</title>
</head>

<body>
	
	<!--导航栏-->
    
    <%
    	Puser user=(Puser)request.getSession().getAttribute("user");
    	if(user==null){
    		%>
    			<jsp:include page="/systemPage/headNavVisitor1.jsp"></jsp:include>		
    		<%
    	}else{
    		%>
				<jsp:include page="/systemPage/headNavVisitor2.jsp"></jsp:include>
    		<%
    	}
    %>
	
	<!--主要内容-->
  <div class="container">
  	 <div class="container_left">
  	 
        <!--全部小组-->
        <div id="recommend_group">
            <h2>全部小组</h2>
              <% 
              List<ArticleCategory> list=(List<ArticleCategory>)request.getAttribute("categorys");
              Set<CategoryEditer> set=null;
              if(user!=null){
              	set=(Set<CategoryEditer>)user.getCategoryEditers();
              }
           	for(ArticleCategory category: list){
              		%>
              		<div class="group">
                    <div class="group_img"><img src="<%=category.getAcPhoto()%>" width="80px" height="80px"></div>
                    <div class="group_content">
                       <div class="group_name"><a href="visitor/visitor_showCategory.do?id=<%=category.getAcId()%>"><%=category.getAcName()%></a><span>共<%=category.getAcUserNum()%>人</span></div>
                       <div class="smallContent">
                         	<%=category.getAcDescription()%>
                       </div>
                       
                       <%
                       		if(user!=null&&Ptool.userIsInCategory(set, category)){
                       			out.print("<div class=‘join_group'><a href='javascript:void(0)'>已经加入小组</a></div>");
                       		}else{
                       			out.print("<div onclick='get(\"visitor/visitor_joinCategory.do?acId="+category.getAcId()+"\")' class=‘join_group'><a>加入小组</a></div>");
                       		}
                       %>
                        </div>
            	</div>
                       <%
              	}
              	
              %>
        </div>
        
        
        <div style="height:50px;"></div>
  	 	</div>
  	 <div class="container_right">
        <!--全站搜索--> 
        <div id="search_box">
            <h2>全站搜索</h2>
           <div>
				<input name='keyWord' class='input-text search_con' placeholder='主题|用户|药品|疗法'>
	  			<input type="submit"  value="搜索" class='search_btn'>
			</div>
        </div>
        <!--社区热帖-->
        <div id="thread">
           <h2>社区热帖</h2>
           <div class="thread_title"><a href="article.html">输卵管炎你知道多少呢？</a></div>
           <div class="thread_comment"><span>浏览量 (123)</span><span>评论 (123)</span></div>
           <div class="thread_title"><a href="article.html">输卵管炎你知道多少呢？</a></div>
           <div class="thread_comment"><span>浏览量 (123)</span><span>评论 (123)</span></div>
           <div class="thread_title"><a href="article.html">输卵管炎你知道多少呢？</a></div>
           <div class="thread_comment"><span>浏览量 (123)</span><span>评论 (123)</span></div>
           <div class="thread_title"><a href="article.html">输卵管炎你知道多少呢？</a></div>
           <div class="thread_comment"><span>浏览量 (123)</span><span>评论 (123)</span></div>
        </div>
         <!--最新话题-->
        <div id="topic_box">
            <h2>最新话题</h2>
               <div class="topic">
              <div class="topic_content"><a href="article.html">求减肥良方</a></div>
              <div class="topic_time"><img src="images/aex_userImg/time_jiao.png" align="left">十五分钟前</div>
              <div class="topic_group">美容减肥互助帮</div>
            </div>
            <div class="topic">
              <div class="topic_content"><a href="article.html">输卵管炎你知道多少呢？</a></div>
              <div class="topic_time"><img src="images/aex_userImg/time_jiao.png" align="left">二十五分钟前</div>
              <div class="topic_group">美容减肥互助帮</div>
            </div>
            <div class="topic">
              <div class="topic_content"><a href="article.html">全身吸脂大概需要什么东西胜多负少抵抗力</a></div>
              <div class="topic_time"><img src="images/aex_userImg/time_jiao.png" align="left">五分钟前</div>
              <div class="topic_group">美容减肥互助帮</div>
            </div>
            <div class="topic">
              <div class="topic_content"><a href="#article.html">求减肥良方</a></div>
              <div class="topic_time"><img src="images/aex_userImg/time_jiao.png" align="left">五分钟前</div>
              <div class="topic_group">美容减肥互助帮</div>
            </div>
            <div class="topic">
              <div class="topic_content"><a href="article.html">求减肥良方</a></div>
              <div class="topic_time"><img src="images/aex_userImg/time_jiao.png" align="left">五分钟前</div>
              <div class="topic_group">美容减肥互助帮</div>
            </div>
        </div>
        <!--介绍高友帮-->
        <div id="introduction">
            <h2>什么是高友帮？</h2>
            <div>
                高友帮即“慢性病病友互助帮”，慢性病全称是慢性非传染性疾病，不是特指某种疾病，
                像平常我们所说的糖尿病、高血压等都属于慢性病范畴(具体请看左侧各小组病种)。据统计慢性病死亡占我国总死亡原因的85%，根据“中国慢性病防治工作规划”：
                中国现有慢性病确诊患者2.6亿（数据截止到2015年）
            </div>
        </div>
     </div>
  </div>
  <!--底部-->
	
	<jsp:include page="/systemPage/footerVisitor.jsp"></jsp:include>
	
</body>

</html>
